export default {
	state: {
		formData: {
            username: "",
            password: "",
            wssServer: "",
            wssPort: 8088,
            mediaType: "audio",
            callee: "",
        },
        action: {
            register: false,
            openRemoteVideo: false,
            closeRemoteVideo: false,
            openLocalVideo: false,
            closeLocalVideo: false,
            audioCall: false,
            videoCall: false,
            answerCall: false,
            hangUpCall: false,
            stop: false,
        },
        status: {
            data:""
        }
	},
	mutations: {
		setFormData: (state, formData) => {
			uni.setStorageSync("formData",formData);
			state.formData = formData
		},
		setAction: (state, action) => {
			uni.setStorageSync("action",action);
			state.action = action
		},
		setStatus: (state, status) => {
			state.status = status
		}
	},
	actions: {
		setFormData({
			commit
		}, formData) {
			commit('setFormData', formData)
		},
		
		setAction({
			commit
		}, action) {
			commit('setAction', action)
		},
		
		setStatus({
			commit
		}, status) {
			commit('setStatus', status)
		}
	}
}